<div id="order-detail">
	<div class="title">订单详情<span>编号：<?php echo $order['order_number']; ?></span><span class="c-red"><?php echo $order_status[$order['order_status']] ?></span><?php echo $order['order_status']==1?'<a href="javascript:void(0)">现在入库</a>':''; ?></div>
	<div class="content">
		<?php foreach($order_details as $od){ ?>
		<div class="each">
			<div class="goods-number"><?php echo $od->sub_goods_number; ?></div>
			<div class="goods-attr"><?php echo $od->sub_goods_attr; ?></div>
			<div class="supplier-name"><?php echo $od->supplier_name; ?></div>
			<div class="goods-price"><?php echo $od->price; ?>￥</div>
			<div class="goods-quantity"><span><?php echo $od->quantity; ?></span>件</div>
			<div class="goods-t-price"><span><?php echo $od->price * $od->quantity; ?></span>￥</div>
		</div>
		<?php } ?>
		<div class="total">
			<div class="text">共计</div>
			<div class="total-quantity"></div>
			<div class="total-price"></div>
		</div>
		<div class="desc">关联申请单</div>
		<div class="desc-content"><?php echo isset($pur_app)?$pur_app['pur_app_number']:'无'; ?></div>
		<div class="info">
			<div class="person"><?php echo $order['order_realname']; ?></div>
			<div class="date"><?php echo date('Y/m/d', $order['create_date']); ?></div>
		</div>
	</div>
</div>
<script type="text/javascript">
tq = 0;
tp = 0;
$('#order-detail .each').each(function(){
	tq += parseInt($(this).find('.goods-quantity span').text());
	tp += parseInt($(this).find('.goods-t-price span').text());
	$('#order-detail .total-quantity').text(tq + '件');
	$('#order-detail .total-price').text(tp + '￥');
})
</script>
<?php //var_dump($order, $order_details, $pur_app) ?>